Q: Which of the following problems occur due to linear probing?
Solution: Primary collision occurs due to linear probing technique. It is overcome using a quadratic probing technique.
Q: How many probes are required on average for insertion and successful search?
Solution: Using formula, the average number of probes required for insertion is 2.5 and for a successful search, it is 1.5.
Q: What is the load factor for an open addressing technique?
Solution: The load factor for an open addressing technique should be 0.5. For separate chaining technique, the load factor is 1.
Q: Which of the following is not a collision resolution strategy for open addressing?
Solution: Linear probing, quadratic probing and double hashing are all collision resolution strategies for open addressing whereas rehashing is a different technique.
Q: In linear probing, the cost of an unsuccessful search can be used to compute the average cost of a successful search.
Solution: Using random collision resolution algorithm, the cost of an unsuccessful search can be used to compute the average cost of a successful search.
Q: Which of the following is the correct function definition for linear probing?
Solution: The function used in linear probing is defined as, F(i)=I where i=0,1,2,3….,n.
Q: ___________ is not a theoretical problem but actually occurs in real implementations of probing.
Solution: Clustering is not a theoretical problem but it occurs in implementations of hashing. Rehashing is a kind of hashing.
Q: What is the hash function used in linear probing?
Solution: The hash function used in linear probing is defined to be H(x)= (key+ F(i)) mod table size where i=0,1,2,3,…,n.
Q: Hashing can be used in online spelling checkers.
Solution: If misspelling detection is important, an entire dictionary can be pre-hashed and words can be checked in constant time.
Q: In the following given hash table, use linear probing to find the location of 49. 0 1 2 3 4 5 6 7 8 18 9 89
Solution: Initially, collision occurs while hashing 49 for the first time. Hence, after setting f(i)=1, the hashed location is found to be 0.
You Have Score    | /10 |